package com.lingx.web.api.impl;

import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.lingx.service.ModelService;
import com.lingx.web.api.IApi;
@Component
public class Api9008 extends AbstractDevApi implements IApi{
	@Resource
	private ModelService modelService;
	@Override
	public int getApiCode() {
		return 9008;
	}
	@Override
	public String getApiName() {
		return "修改字段属性";
	}
	@Override
	public Map<String, Object> api(Map<String, Object> params) {//String code, String id, String prop,String value, String oldvalue,
		Map<String,Object> ret=IApi.getRetMap(1, "操作成功");
		String code=params.get("code").toString();
		String id=params.get("id").toString();
		String prop=params.get("prop").toString();
		String value=IApi.getParamString(params,"value","");//param.get("value").toString();
		modelService.saveProperty(code, id, prop, value, "", "lingx.com");
		return ret;
	}

}
